#!/usr/bin/python
#coding: utf-8
############################
__author__ = "kauu (kauu@yahoo.cn)"
__version__ = "1.0"
__copyright__ = "Copyright (c) 2008 "
__license__ = "NO"


import Crawler

class Page:
	"""
	a pager 's super class
	define the basi method and parameters
	"""
	def __init__(self):
		self.url = ''
		self.domain = 'default'
		self.list = []
		self.items = []	      
		self.html = ''			      
		self.info = {} 	
	def init(self):
		"""initialyzation for new using
		"""
		self.__init__()
		
	#抓取url对应的页面	
	def fetch(self,crawler = Crawler.Crawler()):
		"""fetch the page of the self's url
		"""
		self = crawler.crawlPage(self)
		#print self.html
		
	#分析出所有下一页的url	
	def parseList(self):
		"""parse for the pageList 
		"""
		return None
	#抽取出所有entry
	def parseItems(self):
		"""parse for entry items 
		"""
		return None
	#抓取下一页,
	#return self
	def fetchNext(self):
		"""fetch the next page if has
		"""
		return self
	#存在页面html
	def save(self,file):
		"""
	save the self's url and  html
	the first line is the url
	then the html code	 
		"""
		return None
